﻿using 第二次作业;

var creditAccount = new creditAccount("001","credit","credit",1000000,1000000);
var ATM=new ATM(creditAccount);
ATM.BigMoneyFetched += (sender, e) =>
            Console.WriteLine("触发大额取款事件!");
try
{
    ATM.Withdraw(100000);
}
catch (BadCashException ex)
{
    Console.WriteLine($"错误: {ex.Message}");
}
